local hx__dangyi = fk.CreateSkill {
  name = "hx__dangyi",
}

Fk:loadTranslationTable{
  ["#hx__dangyi-invoke"] = "荡异：是否令你对 %dest 造成的伤害+1？",
  ["$dangyi1"] = "哼！斩首示众，以儆效尤。",
  ["$dangyi2"] = "汝等仍存异心，可见心存魏阙。",
}

hx__dangyi:addEffect(fk.DamageCaused, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(hx__dangyi.name) and player:usedSkillTimes(hx__dangyi.name) < 2
  end,
  on_cost = function (self, event, target, player, data)
    local room = player.room
    if room:askToSkillInvoke(player, {
      skill_name = hx__dangyi.name,
      prompt = "#hx__dangyi-invoke::"..data.to.id,
    }) then
      event:setCostData(self, {tos = {data.to}})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    data:changeDamage(1)
  end,
})

return hx__dangyi
